package org.linuxsogood.boot.misc;


import java.util.Arrays;

/**
 * @author liu.hongwei
 * @since 2020/10/20 16:09
 */
public class ColorBall {
    //static int M = 6;
    //static int[] poll = new int[]{6,9,11,16,24,30,31,33};
    static int M = 2;
    static int[] poll = new int[]{6,9,11,2};
    static int[] indexArr = new int[M];

    public static void main(String[] args){
        C(poll.length, M);
    }

    public static void C(int m,int n){
        for (int i = n; i <= m; i++) {
            indexArr[n - 1] = i - 1;
            if (n > 1) {
                C(i - 1, n - 1);
            } else {
                System.out.println("b: " + Arrays.toString(indexArr));
                for (int j = 0; j <= M - 1; j++) {
                    System.out.print(poll[indexArr[j]] + " ");
                }
                System.out.println();
            }
        }
    }

    public static void m() {

    }

}
